﻿
namespace Calendar.Domain
{
    public class PomodoroWork : PomodoroState//pomodoroState (abstract)
    {
        TimeAllocation _timeAllocation;

        public PomodoroWork(TimeAllocation timeAllocation)
        {
            Initialize(timeAllocation.TimeSlot);//pomodoraState裡面
            _timeAllocation = timeAllocation;
        }

        public override PomodoroState NextPomodoroState
        {
            get
            {
                return new PomodoroBreak(_timeAllocation);
            }
        }

        public override string TimeLabelText
        {
            get
            {
                return "工作中 " + (Counter / 60).ToString() + ":" + (Counter % 60).ToString();
            }
        }

        public override int PomodoroProgressBarValue
        {
            get
            {
                return (int)(Counter / (double)TotalTime * 100);
            }
        }
    }
}
